package com.wyd;

import com.wyd.component.netty.DeviceServer;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
import tk.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.context.config.annotation.RefreshScope;

@SpringBootApplication
@EnableDiscoveryClient
@RefreshScope
@MapperScan("com.wyd.mapper")
@EnableSwagger2
public class ProviderApplication {

    public static void main(String[] args) {
        SpringApplication.run(ProviderApplication.class, args);
        long startTime = System.currentTimeMillis();
        SpringApplication.run(ProviderApplication.class, args);
        long endTime = System.currentTimeMillis();
        String msg = String.format("启动完成...耗时(s)：%s",(endTime-startTime)/1000);
        System.out.println(msg);

//        new DeviceServer(1,2).start(9000);
    }

}
